{extend name='common/_container'} 
{block name="content"} 
<div class="ibox float-e-margins"> 
	<div class="ibox-content"> 
		<table class="table table-bordered" style="word-break:break-all;"> 
			<tbody> 
				<tr> 
					<td style="background-color:#F5F5F6; font-weight:bold; text-align:right" width="15%">红娘id：</td>
					<td>{$info.matchmaker_id}</td>
				</tr> 
			<!--	<tr>
					<td style="background-color:#F5F5F6; font-weight:bold; text-align:right" width="15%">电话：</td> 
					<td>{$info.phone}</td>   
				</tr>-->
				<tr>
					<td style="background-color:#F5F5F6; font-weight:bold; text-align:right" width="15%">文字：</td>
					<td id="content">{$info.content}</td>
					<td><button  type="button" class="btn btn-success btn-xs"  onclick="copy()">复制</button></td>
				</tr>



				<tr>
					<td style="background-color:#F5F5F6; font-weight:bold; text-align:right" width="15%">图片：</td>
					<td>
						{foreach $info.photos as $key=>$vo }
						<a href="javascript:void(0)" onclick="openImg2('{$vo}')"><img height='60' src="{$vo}"></a>
						{/foreach}
					</td>
				</tr>
			</tbody> 
		</table> 
	</div> 
</div>
<script>
	function copy(){
		var text=$("#content").text();
		var input = document.createElement('input');
		input.setAttribute('readonly', 'readonly');
		input.setAttribute('value', text);
		document.body.appendChild(input);
		input.select();
		input.setSelectionRange(0, 9999);
		document.execCommand('Copy');
		input.remove();
		if (document.execCommand('Copy')) {
			alert("复制成功！");
		}
	}
	openImg2 = function(value){
		var img = "<img src="+value+">";
		layer.open({
			type: 1,
			shade: false,
			title: false, //不显示标题
			area:['500px','500px'],
			content: img, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
			cancel: function () {
				//layer.msg('图片查看结束！', { time: 5000, icon: 6 });
			}
		});
	}

</script>

{/block} 
